package teacher

import (
	"github.com/gin-gonic/gin"
	"project/pkg/dao/mysql"
	"project/pkg/router"
)

func init() {
	router.AddRouter(new(TRouter))
}

type TRouter struct {
}
type THandler struct {
	M mysql.Mysql
}

func NewTHandler() *THandler {
	return &THandler{
		M: mysql.NewMysql(),
	}
}
func (TRouter) Router(e *gin.Engine) {
	handler := NewTHandler()
	teacher := e.Group("teacher")
	teacher.POST("/login", handler.Login)
	teacher.POST("/register", handler.Register)
	teacher.POST("/wx/info", handler.SearchTeacherToWx)
	teacher.POST("/wx/info/class", handler.SearchTeacherToWxClass)
}
